package com.lecyon.farm.vo.request;

import com.lecyon.farm.common.constant.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 登录Vo
 *
 * @author Yao Zheng
 * @Date 2019/9/3 16:53
 */
@Data
@ApiModel("登录Vo")
public class LoginVo {

    @ApiModelProperty(name = "account", value = "账号")
    @NotBlank(message = "账号不能为空")
    @Length(min = CommonConstant.MIN_LENGTH_FIELD, max = CommonConstant.MAX_LENGTH_FIELD, message = "账号长度必须在{min} ~ {max}之间")
    private String userName;

    @ApiModelProperty(name = "password", value = "密码")
    @NotBlank(message = "密码不能为空")
    @Length(min = CommonConstant.MIN_LENGTH_FIELD, max = CommonConstant.MAX_LENGTH_FIELD, message = "密码长度必须在{min} ~ {max}之间")
    private String password;

    @ApiModelProperty(name = "requestSource", value = "请求来源")
    @Length(min = CommonConstant.MIN_LENGTH_FIELD, max = CommonConstant.MAX_LENGTH_FIELD, message = "请求来源长度必须在{min} ~ {max}之间")
    private String requestSource;

}
